﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WeChatV3Pay.Application.Transactions.Dtos.JsApi
{

    public class QueryTransactionRes : WeChatBaseResponse
    {
        /// <summary>
        /// 订单金额
        /// </summary>
        /// <example>{"total":100,"currency":"CNY"}</example>
        /// <remarks>订单金额信息</remarks>
        [JsonProperty("amount")]
        public Amount Amount { get; set; }

        /// <summary>
        /// 应用ID
        /// </summary>
        /// <example>wxd678efh567hg6787</example>
        /// <remarks>由微信生成的应用ID，全局唯一。请求基础下单接口时请注意APPID的应用属性，例如公众号场景下，需使用应用属性为公众号的服务号APPID</remarks>
        [JsonProperty("appid")]
        public string AppId { get; set; }

        /// <summary>
        /// 附加数据
        /// </summary>
        /// <remarks>附加数据，在查询API和支付通知中原样返回，可作为自定义参数使用，实际情况下只有支付完成状态才会返回该字段。</remarks>
        [JsonProperty("attach")]
        public string Attach { get; set; }

        /// <summary>
        /// 付款银行
        /// </summary>
        /// <example>CMC</example>
        /// <remarks>银行类型，采用字符串类型的银行标识。银行标识请参考《银行类型对照表》</remarks>
        [JsonProperty("bank_type")]
        public string BankType { get; set; }

        /// <summary>
        /// 应用ID
        /// </summary>
        /// <example>1230000109</example>
        /// <remarks>直连商户的商户号，由微信支付生成并下发。</remarks>
        [JsonProperty("mchid")]
        public string MchId { get; set; }

        /// <summary>
        /// 商户订单号
        /// </summary>
        /// <example>1217752501201407033233368018</example>
        /// <remarks>商户系统内部订单号，只能是数字、大小写字母_-*且在同一个商户号下唯一</remarks>
        [JsonProperty("out_trade_no")]
        public string OutTradeNO { get; set; }

        /// <summary>
        /// 支付者
        /// </summary>
        /// <example>{"openid":"oUpF8uMuAJO_M2pxb1Q9zNjWeS6o"}</example>
        /// <remarks>支付者信息</remarks>
        [JsonProperty("payer")]
        public Payer Payer { get; set; }

        /// <summary>
        /// 支付完成时间
        /// </summary>
        /// <remarks>支付完成时间</remarks>
        [JsonProperty("success_time")]
        public string SuccessTime { get; set; }

        /// <summary>
        /// 交易状态
        /// </summary>
        [JsonProperty("trade_state")]
        public string TradeState { get; set; }

        /// <summary>
        /// 交易状态描述
        /// </summary>
        [JsonProperty("trade_state_desc")]
        public string TradeStateDesc { get; set; }

        /// <summary>
        /// 交易类型
        /// </summary>
        [JsonProperty("trade_type")]
        public string TradeType { get; set; }

        /// <summary>
        /// 微信支付订单号
        /// </summary>
        [JsonProperty("transaction_id")]
        public string TransactionId { get; set; }
    }

}
